//
//  OrderModel.m
//  lhpc_manager
//
//  Created by 李英杰 on 2017/9/6.
//  Copyright © 2017年 zhaoyongjie. All rights reserved.
//

#import "OrderModel.h"

@implementation OrderModel

- (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {

    _boardingPoint = [self getWantingStr:dic[@"boardingPoint"]];
    
    _breakoutPoint = [self getWantingStr:dic[@"breakoutPoint"]];
    return YES;
}

- (NSString *)getWantingStr:(NSString *)dicStr {
    NSData *pointData = [(NSString *)dicStr dataUsingEncoding : NSUTF8StringEncoding];
    NSDictionary *pointDic = [NSJSONSerialization JSONObjectWithData:pointData options:kNilOptions error:NULL];
    return [NSString stringWithFormat:@"%@%@",[pointDic valueForKey:@"city"], [pointDic valueForKey:@"name"]];
}

@end
